//
//  MyTableViewCell.m
//  小胖兔旅行指南
//
//  Created by dlios on 15/4/14.
//  Copyright (c) 2015年 小胖兔. All rights reserved.
//

#import "MyTableViewCell.h"

@implementation MyTableViewCell

-(void)dealloc
{
    [_title release];
    [_image release];
    [_address release];
    
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIView *cellView = [[[UIView alloc] initWithFrame:CGRectMake(0, 5, [[UIScreen mainScreen] bounds].size.width, 200)] autorelease];
        [self.contentView addSubview:cellView];
        
        self.image = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, cellView.frame.size.width, cellView.frame.size.height - 10)] autorelease];
        [_image.layer setMasksToBounds:YES];
        [_image.layer setCornerRadius:10];
        [cellView addSubview:_image];
        
        self.title = [[[UILabel alloc] initWithFrame:CGRectMake(10, 140, cellView.frame.size.width - 100, 20)] autorelease];
        _title.textColor = [UIColor whiteColor];
        [cellView addSubview:_title];
        
        self.address = [[[UILabel alloc] initWithFrame:CGRectMake(10, 170, cellView.frame.size.width - 100, 10)] autorelease];
        _address.textColor = [UIColor whiteColor];
        [cellView addSubview:_address];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
